<div  class="content-wrapper" [@routerTransition]>
    <menu-Info-container [kind]="kind" [seo]="pageConfig?.diySeo">
        <div role="actions" [hidden]="hiddenList">
            <button (click)="swapOrder()" class="btn btn-primary blue  mr-1"
                *ngIf="permissionDic['Pages_Manage_Content_Update']">
                <i class="bi bi-arrow-down-up"></i> {{"Order" | localize}}
            </button>
            <button (click)="create()" *ngIf="permissionDic['Pages_Manage_Content_Create']"
                class="btn btn-primary blue mr-1">
                <i class="fa fa-plus"></i> {{"CreateNew" | localize}}
            </button>
            <button (click)="synchorization()" class="btn btn-primary blue mr-1"
                *ngIf="dataSynchronous && permissionDic['Pages_Manage_Content_Synchorization']">
                <i class="bi bi-stickies"></i>{{"ManualSynchorization" | localize}}
            </button>
            <button (click)="changeState(true)" *ngIf="permissionDic['Pages_Manage_Content_Publish']"
                class="btn btn-primary blue mr-1">
                <i class="fa fa-book"></i> {{"Release" | localize}}
            </button>
            <button (click)="changeState(false)" *ngIf="permissionDic['Pages_Manage_Content_Publish']"
                class="btn btn-warning mr-1">
                <i class="fa fa-reply"></i> {{"CancelRelease" | localize}}
            </button>
            <button (click)="delete()" *ngIf="permissionDic['Pages_Manage_Content_Delete']" class="btn btn-warning">
                <i class="fa fa-trash"></i> {{"Delete" | localize}}
            </button>
        </div>
        <div role="actions" [hidden]="hiddenDetail">
            <button class="btn btn-primary blue mr-1" *ngIf="(permissionDic['Pages_Manage_Content_Create'] || permissionDic['Pages_Manage_Content_Update'])&&listDataCacheEnable" type="button" (click)="resetListApiCache()"><i class="fa fa-sync"></i>重置列表页缓存</button>
            <button class="btn btn-primary blue mr-1" *ngIf="dataSynchronous && permissionDic['Pages_Manage_Content_Synchorization'] && !id" (click)="synchorization2()"><i class="bi bi-stickies"></i>{{"ManualSynchorization" | localize}}</button>
            <button class="btn btn-primary blue mr-1" *ngIf="dataSynchronous && permissionDic['Pages_Manage_Content_Synchorization'] && id" (click)="synchorizationById()"><i class="bi bi-stickies"></i>{{"ManualSynchorization" | localize}}</button>
            <button class="btn btn-primary blue mr-1"  [disabled]="!finanicalProductForm.form.valid" *ngIf="permissionDic['Pages_Manage_Content_Create'] && !id" type="button"  [buttonBusy]="saving" [busyText]="l('SavingWithThreeDot')"  (click)="save()"><i class="fa fa-save"></i>{{"Save" | localize}}</button>
            <button class="btn btn-primary blue mr-1"  [disabled]="!finanicalProductForm.form.valid" *ngIf="id && permissionDic['Pages_Manage_Content_Update'] && (!data.isActive ||permissionDic['Pages_Manage_Content_Publish'])" type="button" [buttonBusy]="saving" [busyText]="l('SavingWithThreeDot')" (click)="save()"><i class="fa fa-save"></i>{{"Save" | localize}}</button>
            <button class="btn btn-primary blue mr-1" *ngIf="permissionDic['Pages_Manage_Content_Publish'] && id" (click)="changeSingleState(true)"><i class="fa fa-book"></i>{{"Release" | localize}}</button>
            <button class="btn btn-warning mr-1" *ngIf="permissionDic['Pages_Manage_Content_Publish'] && id"
                (click)="changeSingleState(false)"><i class="fa fa-reply"></i>{{"CancelRelease" | localize}}</button>
            <button class="btn btn-warning" *ngIf="permissionDic['Pages_Manage_Content_Delete'] && id"
                (click)="deleteSingle()"><i class="fa fa-trash"></i>{{"Delete" | localize}}</button>
        </div>

        <div role="content"  [busyIf]="isLoading">
            <div [hidden]="hiddenList">
                <form class="form" autocomplete="new-password">
                    <div>
                        <div class="row align-items-center mb-4">
                            <div class="col-xl-12">
                                <div class="form-group m-form__group align-items-center">
                                    <div class="input-group">
                                        <input [(ngModel)]="inputPara.filter" name="filterText" autoFocus
                                               class="form-control m-input" [placeholder]="l('SearchWithThreeDot')"
                                               type="text">
                                        <div class="input-group-append">
                                            <button (click)="getListData()" class="btn btn-default"
                                                    type="submit">
                                                <i class="icon-magnifier"
                                                   [attr.aria-label]="l('Search')"></i>
                                            </button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row" *ngIf="advancedFiltersAreShown">
                            <div class="col-xl-6">
                                <div class="form-group">
                                    <label class="control-label">{{"InfoState" | localize}}</label>
                                    <select class="form-control"  name="infoState" (change)="getListData()" [(ngModel)]="inputPara.infoState">
                                        <option value="#" >{{"InfoState" | localize}}</option>
                                        <option value="ActiveState">{{"HasRelease" | localize}}</option>
                                        <option value="UnActiveState">{{"NotRelease" | localize}}</option>
                                    </select>
                                </div>
                            </div>
<!--                             <div class="col-xl-6"  *ngIf="pageConfig?.keyName === '节点营销-全球重点节点'">
                                <div class="form-group">
                                    <label class="control-label">地区</label>
                                    <taxonomy-combo defaultValue="#" fieldName="area" typeId="festivalArea" [multiple]="false"
                                      [byValue]="true" [(selectedValue)]="inputPara.str7" (callBack)="getListData()"></taxonomy-combo>
                                </div>
                            </div> -->
                        </div>
                        <div class="row mb-4" >
                            <div class="col-sm-12">
                                <span class="clickable-item text-muted" *ngIf="!advancedFiltersAreShown"
                                      (click)="advancedFiltersAreShown=!advancedFiltersAreShown">
                                    <i class="fa fa-angle-down"></i> {{"ShowAdvancedFilters" | localize}}
                                </span>
                                <span class="clickable-item text-muted" *ngIf="advancedFiltersAreShown"
                                      (click)="advancedFiltersAreShown=!advancedFiltersAreShown">
                                    <i class="fa fa-angle-up"></i> {{"HideAdvancedFilters" | localize}}
                                </span>
                            </div>
                        </div>
                    </div>
                </form>

                <div class="tableContainer">
                    <!--<Primeng-TurboTable-Start>-->
                    <content-list-tab #contentListTab [primengTableHelper]="primengTableHelper"
                                      [permissionDic]="permissionDic"
                                      [pageConfig]="pageConfig"
                                      (getListData)="getListData($event)"
                                      (goRelatePage)="goRelatePage($event)"
                                      (editModal)="editModal($event)"></content-list-tab>
                    <!--<Primeng-TurboTable-End>-->
                </div>
            </div>

            <div [hidden]="hiddenDetail">
                <form #finanicalProductForm="ngForm" novalidate>
                    <ng-container #vc></ng-container>

                    <div class="row" *ngIf="dataSynchronous">
                        <div class="col-sm-6">
                            <div class="md-checkbox-list">
                                <div class="md-checkbox">
                                    <input id="autoSynchronous" name="autoSynchronous" class="md-check" type="checkbox" [(ngModel)]="data.autoSynchronous">
                                    <label for="autoSynchronous">
                                        <span class="inc"></span>
                                        <span class="check"></span>
                                        <span class="box"></span>
                                        {{"AutoSynchronous" | localize}}
                                    </label>
                                </div>
                            </div>
                        </div>
                        <div class="col-sm-6"></div>
                    </div>
                </form>
            </div>
        </div>
    </menu-Info-container>

    <content-detail-modal #contentDetailModal (backListEvent)="reloadPage()" (seoEdit)="goSeoModal($event)"></content-detail-modal>
    <content2-list-modal #content2ListModal></content2-list-modal>
    <content-list-modal #contentListModal></content-list-modal>
    <seo-modal #seoModal></seo-modal>
    <order-by-modal #orderByModal  (callback)="getListData($event)"></order-by-modal>
</div>
